﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using it_security_project.App_Code.BusinessLogicLayer;

namespace it_security_project
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public new Site site { get { return base.Master as Site; } }

        protected void LogoutTimer_Tick(object sender, EventArgs e)
        {
            Response.Redirect("~/Default.aspx");
        }

        protected override void OnInit(EventArgs e)
        {
            Member member = site.LoginWithSession();

            if (member != null) // User is NOT logged in
            {
                Response.Redirect("~/Default.aspx");
            }
            
        }
    }
}